How do I add elements in xml based on another element attribute using python

welcome to shbcf.ru